/*****************************************************************************
 * 常量数据
 ****************************************************************************/
var CONST = new _constant();

function _constant() {

	/************************************************************************
	 * 根据名称统一取类的属性
	 * @author fgg047 <9110530@qq.com>
	 * @createDate 2019-04-27
	 * @param name : 属性名称
	 * @param type : 取值分类
	 * 说明：只要type有值，就会在列表首部加上全部一行数据
	 ************************************************************************/
	this.get = function (name, type) {
		// 根据名称获取类的属性
		var bean = this[name];
		// 如果第二个参数有值，就加上全部选项
		if (type) {
			var data = [
				{ id: '', text: '全部' }
			];
			var list = bean.data;
			for (var i = 0; i < list.length; i++) {
				data.push(list[i]);
			}
			return data;
		}
		return bean.data;
	}

	// 以下是数据部分
	 this.sex = {
		title: '性别',
		data: [
			{id: '1', text: '男'},
			{id: '2', text: '女'}
		]
	}

	 this.WorkDayType = {
		title: '工作日类型',
		data: [
			{id: '工作日', text: '工作日'},
			{id: '假日', text: '假日'},
			{id: '节日', text: '节日'}
		]
	}

	 this.useState = {
		title: '启用禁用状态',
		data: [
			{id: '1', text: '启用'},
			{id: '2', text: '停用'}
		]
	}

	 this.hasState = {
		title: '有无状态',
		data: [
			{id: '1', text: '有'},
			{id: '2', text: '无'}
		]
	}

	 this.onJobState = {
		title: '在职状态',
		data: [
			{id: '0', text: '离职'},
			{id: '1', text: '在职'}
		]
	}

	 this.submitState = {
		title: '审批状态',
		data: [
			{id: '0', text: '未提交'},
			{id: '6', text: '已提交'},
			{id: '1', text: '通过'},
			{id: '2', text: '不通过'}
		]
	}

	 this.yesOrNo = {
		title: '是否型状态',
		data: [
			{id: '1', text: '是'},
			{id: '2', text: '否'}
		]
	}

	 this.leaveTypes = {
		title: '请假类型',
		data: [
			{id: '1', text: '事假'},
			{id: '2', text: '病假'},
			{id: '3', text: '调休假'},
			{id: '4', text: '年休假'},
			{id: '5', text: '工伤假'},
			{id: '6', text: '体检假'},
			{id: '7', text: '婚假'},
			{id: '8', text: '产假'},
			{id: '9', text: '育儿假'},
			{id: '10', text: '护理假'},
			{id: '11', text: '丧假'}
		]
	}

	 this.applyTypes = {
		title: '请假类别',
		data: [
			{id: '1', text: '前半天请假'},
			{id: '2', text: '后半天请假'},
			{id: '3', text: '全天请假'}
		]
	}

	 this.overTimeTypes = {
		title: '加班类别',
		data: [
			{id: '1', text: '平日'},
			{id: '2', text: '假日'},
			{id: '3', text: '节日'}
		]
	}

	 this.companyTypes = {
		title: '关系分类',
		data: [
			{id: '1', text: '供应商'},
			{id: '2', text: '客户'}
		]
	}

	 this.quitTypes = {
		title: '离职类型',
		data: [
			{id: '1', text: '辞职'},
			{id: '2', text: '辞退'},
			{id: '3', text: '解雇'},
			{id: '4', text: '试用期不合格'},
			{id: '5', text: '其它'}
		]
	}

	this.educationTypes = {
		title: '学历',
		data: [
			{id: '1', text: '初中及以下'},
			{id: '2', text: '高中'},
			{id: '3', text: '大专'},
			{id: '4', text: '本科'},
			{id: '5', text: '研究生及以上'},
		]
	}

	 this.dataTypes = {
		title: '数据库字段数据类型定义',
		data: [
			{id: '定长文本', text: '定长文本'},
			{id: '变长文本', text: '变长文本'},
			{id: '布尔类型', text: '布尔类型'},
			{id: '数字整型', text: '数字整型'},
			{id: '数字长整型', text: '数字长整型'},
			{id: '数字双精度型', text: '数字双精度型'},
			{id: '数字高精度型', text: '数字高精度型'},
			{id: '日期时间', text: '日期时间'},
			{id: '数字列表', text: '数字列表'},
			{id: '文本列表', text: '文本列表'}
		]
	}

	 this.compareTypes = {
		title: '查询比较符定义',
		data: [
			{id: '=', text: '等于'},
			{id: '<', text: '小于'},
			{id: '>', text: '大于'},
			{id: '<=', text: '小于等于'},
			{id: '>=', text: '大于等于'},
			{id: 'like', text: '相似'},
			{id: '!=', text: '不等于'}
		]
	}
}